import { View, Image, Text } from '@tarojs/components'
//import { getStorageSync } from '@tarojs/taro'
import {  AtRate, AtAvatar,AtAccordion,AtList,AtSearchBar } from 'taro-ui'
import NavBar from '../../components/topbar/topbar'
//import NavBar from "../../pages/my/fit";
import { useState } from 'react'
import Taro from '@tarojs/taro'
import './dietitian.scss'
import communication from "./image/communication.png";
function dietitian(){
    const toBack = () => {
        Taro.navigateBack().then()
    }
    const[open,setopen]=useState(false)
    const[SearchBar,setSearchBar]=useState()

    const region = (value) =>{
        setopen(value)
    }
    const onChange = (value) =>{
        setSearchBar(value)
    }
    const handleClick = () => {
        Taro.navigateTo({
            url: '/pages/dietitian/introduction/introduction'
        })
    }
    return(
        <View>
            <View className='box'>
                <NavBar title="营养师" back nback={toBack}/>
                <View className='search'>
                    <AtSearchBar value={SearchBar} onChange={onChange}/>
                </View>
            </View>
                <AtAccordion open={open} onClick={region} title='全国'>
                    <AtList hasBorder={false}></AtList>
                </AtAccordion>
            <View className='IDcard' onClick={handleClick}>
                <View className='IDcard_top'>
                    <AtAvatar image='https://jdc.jd.com/img/200'/>
                    <View className='name'>
                        <View className='name_a'>
                            <View className='name_text1'>张三李</View>
                            <View className='online'>医生在线</View>
                        </View>
                        <View className='name_text2'>副主任医师</View>
                        <View className='name_text2'>XXXX医院</View>
                    </View>
                    <View className='ping'>
                        <View className='ping_text'>综合评分：</View>
                        <AtRate size='12' margin='0' value={4.5} />
                        <View className='ping_text1'>4.5分</View>
                    </View>
                </View>
                <View className='like'>
                        擅长：你成都南京的看看你科技大学此举可能仓库就你多想空间中
                </View>
                <View className='price'>
                    <View className='pricebox'>
                        <image src={communication} className='communication' />
                        <View className='yuan'>100元</View>
                    </View>
                    <View className='waitFor'>一般等待时长：快</View>
                </View>
            </View>
            <View className='IDcard'>
                <View className='IDcard_top'>
                    <AtAvatar image='https://jdc.jd.com/img/200'/>
                    <View className='name'>
                        <View className='name_a'>
                            <View className='name_text1'>张三李</View>
                            <View className='online'>医生在线</View>
                        </View>
                        <View className='name_text2'>副主任医师</View>
                        <View className='name_text2'>XXXX医院</View>
                    </View>
                    <View className='ping'>
                        <View className='ping_text'>综合评分：</View>
                        <AtRate size='12' margin='0' value={4.5} />
                        <View className='ping_text1'>4.5分</View>
                    </View>
                </View>
                <View className='like'>
                        擅长：你成都南京的看看你科技大学此举可能仓库就你多想空间中
                </View>
                <View className='price'>
                    <View className='pricebox'>
                        <image src={communication} className='communication' />
                        <View className='yuan'>100元</View>
                    </View>
                    <View className='waitFor'>一般等待时长：快</View>
                </View>
            </View>
        </View>
    )
}
export default dietitian